' Test oh an file load and save quadratic data.txt b+ 2021-03-13
. Quadrartic = (x + 5) (2x + 6) = 2x^2 + 16x + 30
set file;1;Quadrartic = (x + 5) (2x + 6) = 2x^2 + 16x + 30
. expected roots are -3, -5
set file;2;expected roots are -3 and -5
a = 2
b = 16
c = 30
set file;3;a = 2  b = 16  c = 30
d = p[s[x[b,b],x[4,a,c]],.5]
root1 = d[a[s[0, b],d],x[2,a]]
root2 = d[s[s[0, b],d],x[2,a]]
.     d = ;d
. root1 = ;root1
. root2 = ;root2
temp = bnd[    d = ,d]
set file;4;temp
temp = bnd[root1 = ,root1]
set file;5;temp
temp = bnd[root2 = ,root2]
set file;6;temp

'calc a small table of F(x)
x = -11 
i = 7
[
	x = a[x,1]
	jmp gt[x,10]
	i = a[i,1]
	fx = a[x[2,x,x],x[16,x],30]
	fline = bnd[x,:,fx]
	. x;spc[2];fx;spc[2];fline
	set file;i;fline
]
. number of lines = ;i
numberOfLines = i
save file;Quadratic Data 2x^2+16x+30.Dat
. data saved to file, press any to load data file and display...
zzz
cls
fdata = load[Quadratic Data 2x^2+16x+30.Dat]
i = 0
[
	i = a[i,1]
	jmp gt[i,numberOfLines]
	fline = get[fdata,i]
	. fline
]